#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>

static int fd = -1;

int main()
{
	int i=0;
	fd=open("/dev/vser",O_RDWR);
	if(fd<0)
	{
		printf("Can't open\n");
		return -1;
	}
	else
	{
		printf("open OK %x\n", fd);
	}

	while(1)
	{
		scanf("%d",&i);
		write(fd, i,sizeof(i));
		sleep(1);
	}
   	close(fd);
  	return 0;
}


